<div id="searchBox">
    <div class="pageTitle">
    	<? if($title_img): ?>
            <img src="<?= $title_img ?>">
        <? endif ?>
    </div>
    <div class="shmini_box">
        <input type="button" value="" id="searchBtn" >
        <input type="text" id="searchTxt">
    </div>
</div>
<div id="cont">
        <div class="ct">
       
        <? if($list['data'] && $orderby): ?>
            <div class="classify-box clearfix">
                <div class="sort category">
                    <select class="select2">
                        <? foreach($orderby as $k=>$v): ?>
                            <option <?= $default['orderby'] == $v ? 'selected="selected"' : '' ?> value="<?= $current_url.'&orderby='.$v.'#down' ?>" >
                                <?= $k?></option>
                        <? endforeach ?>
                    </select>
                </div>
                <div class="description">排序:</div>
            </div>
        <? endif ?>
        <div class="prolists">
                <? if($list['data']): ?>
                <ul>
                    <? foreach($list['data'] as $item): ?>
                    <li>
                        <div class="pic">
                            <a href="<?= DOMAIN.'goods/view/'.$item['goods_sn'].'#down' ?>" target="_blank">
                                <?= goods_img($item['goods_sn'], 1, 'medium', $item['name']) ?>
                            </a>
                        </div>
                        <div class="words">
                            <a href="<?= DOMAIN.'goods/view/'.$item['goods_sn'].'#down' ?>" target="_blank">
                                <div class="enProName"><?= $item['subname'] ?></div>
                                <div class="zhProName">
                                    <?= mb_substr($item['name'], 0, 12) ?>
                                </div>
                                <div class="proPrice">
                                    <?= $item['base_price'] > 0 ? price_format($item['base_price'])  : '&nbsp;' ?>
                                </div>
                            </a>
                        </div>
                    </li>
                    <? endforeach ?>
                </ul>
                <? else: ?>
                <h1>对不起，没有找到任何相关内容。</h1>
                <? endif ?>
        </div>
        <?= $pagination ?>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function(){
        $('#searchBtn').click(function(){
            var name = $('#searchTxt').val();
            if(name)
            {
                window.location.href = $.G.domain+'goods/search/?name='+name+'#down';
            }
        });

        //选择框插件调用
        $(".select2").select2({
            width:"100px"
        }).on("change", function(e){
            window.location.href = e.val;
        });
        

    });
</script>